package com.project.easy.common.framework.web.service.impl.login;

import com.project.easy.common.framework.auth.core.IToken;
import com.project.easy.common.framework.auth.dto.TokenContext;
import org.springframework.util.DigestUtils;

/**
 * @author GreatorMan.cool
 * @copyright: Copyright (c) 2020
 * @company: 扬起科技有限公司
 * @date 2021/11/1 21:44
 * @description: TOKEN 生成
 */
public class DefaultToken implements IToken {
    @Override
    public Boolean createToken(TokenContext tokenContext) {
        tokenContext.setToken(DigestUtils.md5DigestAsHex(String.valueOf(System.currentTimeMillis()).getBytes()));
        return Boolean.TRUE;
    }
    @Override
    public int getOrder() {
        return 0;
    }
}
